import request from '@/utils/request'

// 白条审核列表
export function getWhiteBarList({ storeId, auditState, pageNum, pageSize }) {
    return request({
        url: `/store/audit/white/bar/list?storeId=${storeId}&auditState=${auditState}&pageNum=${pageNum}&pageSize=${pageSize}`,
        method: 'GET'
    })
}

// 白条审核
export function whiteBarAudit(data) {
    return request({
        url: '/store/audit/white/bar/audit',
        method: 'POST',
        data
    })
}

// 白条管理列表
export function whiteBarMarList(data) {
    return request({
        url: '/store/whitebar/mar/list',
        method: 'POST',
        data
    })
}

// 白条审核详情
export function whiteAuditDetail(params) {
    return request({
        url: '/store/audit/white/bar',
        method: 'GET',
        params
    })
}

// 用户白条详情
export function whiteBarDetail(params) {
    return request({
        url: '/store/whitebar/mar/byId',
        method: 'GET',
        params
    })
}

// 还款期限设置
export function repaymentSet(data) {
    return request({
        url: '/store/whitebar/mar/repayment',
        method: 'POST',
        data
    })
}

// 修改用户白条
export function updateWhitebar(data) {
    return request({
        url: '/store/whitebar/mar/update',
        method: 'POST',
        data
    })
}
// 修改用户的某个白条
export function updateUserWhiteBar(data) {
    return request({
        url: '/store/whitebar/mar/updateUserWhiteBar',
        method: 'POST',
        data
    })
}
// 取消授权详情
export function cancelWhitebarDetail(data) {
    return request({
        url: '/store/whitebar/mar/cancel/list',
        method: 'POST',
        data
    })
}


